const OfferDeposit = {
    delimiters: ['${', '}'],
    data() {
        return {
            // 结果列表集
            resList: {
                "offer_deposit": []
            },
            id: ""  // cad_offer_deposit_info 表的主键 id
        }
    },
    computed: {},
    methods: {
        // 查询预存款配置
        qry_offer_desposit(cad_id, offer_id) {
            axios
                //.get("{{ url_for('api.qry_cpcp_offer_deposit', offer_id=session.get('cur_offer_id'))}}")
                .get('api/v1/qry-cpcp-offer-deposit/' + cad_id + '/' + offer_id)
                .then(response => (this.resList['offer_deposit'] = response.data.result))
                .catch(function (error) {
                    console.log(error);
                    alert('【检索失败】\n' + error)
                })
        },
        cpcp_offer_deposit_del() {
            axios({
                method: 'post', url: '{{ url_for("api.join_offer_rel") }}',
                data: {
                    id: document.getElementById('#id')
                }
            })
                .then(response => {
                    console.log(response.data);
                    alert(response.data.code);
                })
                .catch(function (error) {
                    console.log(error);
                    alert('【操作失败】\n' + error)
                })
        },
    }
}
Vue.createApp(OfferDeposit).mount('#collapse-offer-deposit')